<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

return array(
    'router'=>array(
        'routes'=>array(
            'novel'=>array(
                'type'=>'Zend\Mvc\Router\Http\Segment',
                'options'=>array(
                    'route'=>'/api/novel[/:id]',
                    'constraints'=>array(
                        'id'=>'\w+'
                    ),
                    'defaults'=>array(
                        'controller'=>'Novel\Controller\Index'
                    )
                )
            ),
            'create_novel'=>array(
                'type'=>'Zend\Mvc\Router\Http\Literal',
                'options'=>array(
                    'route'=>'/api/novel/create',

                    'defaults'=>array(
                        'controller'=>'Novel\Controller\CreateNovel'
                    )
                )
            ),
        )
    ),
    'di'=>array(
        'services' => array(
            'Novel\Model\NovelTable' => 'Novel\Model\NovelTable',
        )
    ),
    'controllers'=>array(
        'invokables'=>array(
            'Novel\Controller\Index' => 'Novel\Controller\IndexController',
            'Novel\Controller\CreateNovel' => 'Novel\Controller\CreateNovelController',
        )
    )
);